Foliations and algebraic geometry